export function searchApi(param: string) {
  return new Promise<string[]>((resolve, reject) => {
    const p = (param || '').split('')
    const arr: string[] = []
    for(var i = 0; i < 10; i++) {
      const pindex = i % p.length
      arr.push(`${p[pindex] || '^ ^'} - ${Math.random()}`)
    }
    setTimeout(() => {
      if (Math.random() * 10 > 1) {
        resolve(arr)
      } else {
        reject('请求异常，请重新尝试！')
      }
    }, 600)
  })
}